    let as=document.querySelectorAll(".books>.wrap>.leftbox>.bookslun>.booksbtns a");
    console.log(as);
    // let imgs=document.querySelectorAll(".books>.wrap>.leftbox>.bookslun>.bookimgs img");
    let luns=document.querySelector(".books>.wrap>.leftbox>.bookslun");
    let leftbtn=document.querySelector(".books>.wrap>.leftbox>.bookslun>.leftbtns");
    let rightbtn=document.querySelector(".books>.wrap>.leftbox>.bookslun>.rightbtns");
    let imgs =document.querySelectorAll(".bookimgs>img");
    console.log(imgs);
    // let bot1 =document. querySelectorAll(".bookimgs1>img");
    // let bot2 =document. querySelectorAll(".bookimgs2>img");

    // console.log(bot);
    let index = 0  ;
    let timerId=null;
    // 右箭头设置
rightbtn.addEventListener("click",function(){
    index++;
    if(index==as.length){
        index=0;
    }
    play(index);
})
leftbtn.addEventListener("click",function(){
    index--;
    if(index<0){
        index=as.length-1;
    }
    play(index);
})
    // 鼠标进入大盒子，要清除定时器
luns.addEventListener("mouseenter",function(){
    // 清除定时器
    clearInterval(timerId);
})
// 鼠标离开大盒子，定时器重新启动
luns.addEventListener("mouseleave",function(){
    timerId=setInterval(function(){
        index++;
        if(index==as.length){
            index=0;
        }
        play(index);
        
    },1000)
})
    // 为a标签添加事件
    for(let i=0; i<as.length;i++){
       as[i].addEventListener("mouseenter",function(){
           index=i;   
           play(i);
       })
    }
    // 定时器
    timerId=setInterval(function(){
        index++;
        if(index==as.length){
            index=0;
        }
        play(index);
        
    },1000)
    function play(i){
        for(let j=0;j<as.length;j++){
                 as[j].className="";
                 imgs[j].className="";

                }
                as[i].className="ons";
                imgs[i].className="currents";
    }
    let lis =document.querySelectorAll(".books>.wrap>.browse>.browsenav>li");
               for(let i=0;i<lis.length;i++){
    lis[i].onmouseenter=function(){
        this.className="active"
    }
    lis[i].onmouseleave=function(){
        this.className=""
    }
}